<!--
 * @Author: HeAo
 * @Date: 2021-11-03 11:36:32
 * @LastEditTime: 2021-11-03 12:08:46
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \web2103-2105\web2103code\4-1-Nodejs\day04\webui.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../js/vue.js"></script>
  <script src="../js/axios.js"></script>
  <!-- 引入样式 -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  <!-- 引入组件库 -->
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>

<body>
  <div id="app">
    <el-button type="primary" @click="findAllUsers">查询</el-button>
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        users: []
      },
      methods: {
        findAllUsers() {
          axios.get('http://127.0.0.1:3000/user/findAll').then(res => {
            this.users = res.data.data
          })
        }
      },
      created() {

      }
    })
  </script>
</body>

</html>